<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
    <title>员工基本信息</title>
    <script type="text/javascript" src="../../../js/boot.js"></script>

</head>
<body>
<div id="inputForm" style="padding:10px;">

    <table align="center">
        <tr>
            <td align="right">用户姓名：</td>
            <td align="left"><input name="userName" class="mini-textbox" ></td>
            <td align="right">登录名：</td>
            <td align="left"><input name="loginName" class="mini-textbox"/></td>
            <td align="right">登录密码：</td>
            <td align="left"><input name="loginPassword" class="mini-textbox" /></td>
        </tr>
        <tr>
            <td align="right" >性别：</td>
            <td align="left">
                <div class="mini-radiobuttonlist" repeatLayout="table"
                     name="sex"
                     textField="text" valueField="id" value="1"
                     data="[{id:1,text:'男'},{id:2,text:'女'}]" >
                </div>
            </td>
            <td align="right">手机号码：</td>
            <td align="left"><input name="mobile" class="mini-textbox" /></td>
            <td align="right">身份证号：</td>
            <td align="left"><input name="idCard" class="mini-textbox" /></td>
        </tr>
        <tr>
            <td align="right">工号：</td>
            <td align="left"><input name="workNo" class="mini-textbox" /></td>
            <td align="right">工种：</td>
            <td align="left"><input name="jobID" class="mini-combobox" textField="jobName" valueField="jobID" url="http.getUrl('/basic/workType/getWorkTypeListByMap.do')"></td>
            <td align="right">部门：</td>
            <td align="left"><input name="departID" id="depart" class="mini-combobox" textField="departName" valueField="departID" url="http.getUrl('/sys/depart/getDepartmentListByMap.do')" /></td>
        </tr>
        <tr>
            <td align="right">领导姓名：</td>
            <td align="left"><input name="leaderName" id="leader" class="mini-textbox" /></td>
            <td align="right">职务：</td>
            <td align="left"><input name="postName" class="mini-textbox" /></td>
            <td align="right">角色：</td>
            <td align="left"><input name="roleID" class="mini-combobox" textField="roleName" valueField="roleID" url="http.getUrl('/role/list.do')"/></td>
        </tr>
        <tr>
            <td align="right">邮箱：</td>
            <td align="left"><input name="email" class="mini-textbox" /></td>
            <td align="right">生日：</td>
            <td align="left"><input name="birthday" class="mini-datepicker" format="yyyy-MM-dd" /></td>
            <td align="right">学历：</td>
            <td align="left"><input name="education" class="mini-combobox" data="CONST.get('educationTypes')" textField="text" valueField="id" value="1"/></td>
        </tr>
        <tr>
            <td align="right">国家：</td>
            <td align="left"><input name="country" class="mini-textbox"></td>
            <td align="right">省份：</td>
            <td align="left"><input name="province" class="mini-textbox" /></td>
            <td align="right">城市：</td>
            <td align="left"><input name="city" class="mini-textbox" /></td>
        </tr>
        <tr>
            <td align="right">详细地址：</td>
            <td align="left" colspan="3"><input name="address" class="mini-textbox" style="width:400px;"/></td>
        </tr>
        <tr>
            <td align="right">建行帐号：</td>
            <td align="left"><input name="ccbAccount" class="mini-textbox"></td>
            <td align="right">交行帐号：</td>
            <td align="left"><input name="bccAccount" class="mini-textbox" /></td>
        </tr>
        <tr>
            <td align="right">公积金帐号：</td>
            <td align="left"><input name="fundAccount" class="mini-textbox" /></td>
            <td align="right">公积金状态：</td>
            <td align="left"><input name="fundState" class="mini-combobox" data="[{id:1,text:'正常'},{id:2,text:'封存'}]" value="1"/></td>
            <td align="right">入职日期：</td>
            <td align="left"><input name="enterTime" class="mini-datepicker" format="yyyy-MM-dd" ></td>
        </tr>
        <tr>
            <td align="right">异常联系电话：</td>
            <td align="left"><input name="abnormalTel" class="mini-textbox"></td>
            <td align="right">状态：</td>
            <td align="left"><input name="status" class="mini-combobox" data="CONST.get('onJobState')" textField="text" valueField="id" value="1"/></td>
            <td align="right">离职日期：</td>
            <td align="left"><input name="leaveTime" class="mini-datepicker" format="yyyy-MM-dd"></td>
        </tr>
        <tr>
            <td align="right">备注：</td>
            <td align="left" colspan="3"><input name="remark" class="mini-textarea" style="width:400px;" vtype="maxLength:200"/></td>
        </tr>
    </table>
</div>
</body>
</html>
<script type="text/javascript">
    mini.parse();

    var userID;
    var url=window.location.search; //获取url中"?"符后的字串
    if(url.indexOf("?")!=-1){
        url = url.substr(url.indexOf("=")+1);
        if(url.indexOf("&")!=-1){
            url = url.split("&")[0];
        }
    }
    userID = url;
    var inputForm = new mini.Form("#inputForm");
    labelModel(inputForm);
    getData();

    function getData() {
        var data = {
            "userID":userID
        };
        http.post("/user/getUserByMap.do", data, function (page) {
            if (page) {
                inputForm.setData(page);
            } else {
                miniui.showErrorMessageBox(page.message);
            }
        });
    }

    /**表单只读模式**/
    function labelModel(form) {
        var fields = form.getFields();
        for (var i = 0, l = fields.length; i < l; i++) {
            var c = fields[i];
            if (c.setReadOnly)
                c.setReadOnly(true); //只读
            if (c.setIsValid)
                c.setIsValid(true); //去除错误提示
            if (c.addCls)
                c.addCls("asLabel"); //增加asLabel外观, 详见miniui/themes/mythemes/my-themes.css
        }
    }

</script>